home *** CD-ROM | disk | FTP | other *** search
- /*
- AppleEventQueue.h
-
- modified by Francis H Schiffer, 3rd, 1994 July 1 to support Universal Headers
- */
-
- #pragma once
-
- // Format for an Apple event handler function
- // typedef pascal OSErr (*AEHandlerFunc) (AppleEvent*, AppleEvent*, long); /* original */
- #include <AppleEvents.h> /* fhs 1994 july 1 */
- typedef AEEventHandlerUPP AEHandlerFunc; /* fhs 1994 july 1 */
-
- struct PendingAERec { /* fhs 1994 july 1 */
- AppleEvent event;
- AppleEvent reply;
- long refcon;
- AEHandlerFunc handler;
- struct PendingAERec **next;
- };
- };
-
- typedef struct PendingAERec PendingAERec;
-
- // class AppleEventQueue : indirect { /* original */
- class AppleEventQueue { /* fhs 1994 july 1 */
-
- protected:
- PendingAERec **head; // Handle to a record for the first pending Apple event
- PendingAERec **tail; // Handle to a record for the last pending Apple event
- short numAEvents; // Number of pending Apple events
-
- public:
- AppleEventQueue (void); // Constructor
- virtual OSErr Put (AppleEvent *event, AppleEvent *reply, AEHandlerFunc handler, long refcon);
- virtual OSErr Get (AppleEvent *event, AppleEvent *reply, AEHandlerFunc *handler, long *refcon);
-
- };
-
-